package de.fhd.pms.dto;

import java.util.Date;

public class AutoDTO implements Comparable<AutoDTO>{

	private int id;
	private Date created;
	private String baujahr;
	private String farbe;
	private String kennzeichen;
	private float km;
	private String marke;
	private String modell;
	private String tarif;
	private String station;

	public AutoDTO(int autoId, Date created, String baujahr, String farbe,
			String kennzeichen, float km, String marke,String modell, String tarif, String stationName) {
		this.id=autoId;
		this.created = created;
		this.baujahr = baujahr;
		this.farbe = farbe;
		this.kennzeichen = kennzeichen;
		this.km = km;
		this.marke = marke;
		this.modell = modell;
		this.tarif = tarif;
		this.station = stationName;
	}

	@Override
	public int compareTo(AutoDTO o) {
		if (this.created == null && o.created == null) {
			return this.id - o.id;
		} else if (this.created == null) {
			return -1;
		} else if (o.created == null) {
			return 1;
		} else {
			return this.created.compareTo(o.created);
		}
	}

	public int getId() {
		return id;
	}




	public String getBaujahr() {
		return baujahr;
	}




	public String getFarbe() {
		return farbe;
	}




	public String getKennzeichen() {
		return kennzeichen;
	}




	public float getKm() {
		return km;
	}



	public String getMarke() {
		return marke;
	}




	public String getModell() {
		return modell;
	}



	public String getTarif() {
		return tarif;
	}

	public String getStation() {
		return station;
	}

	public Date getCreated() {
		return created;
	}







}
